﻿.listing__back {
    display: inline-flex;
    margin: 1.5rem auto 0.5rem;
    max-width: 1200px;
    width: 100%;
}

.listing__details {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 1rem auto 3rem;
    align-items: start;
}

.listing__hero {
    display: block;
}

.listing__hero h1 {
    font-size: 2rem;
    margin: 0 0 0.75rem;
}

.listing__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: #475569;
    font-size: 0.95rem;
}

.listing__section h2 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
}

.listing__section p {
    margin: 0;
    color: #1e293b;
}

.listing__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.listing__tag {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.listing__tags__empty {
    font-size: 0.9rem;
    opacity: 0.7;
}

.listing__helper__cta {
    display: flex;
    justify-content: center;
}

.listing__sidebar {
    position: sticky;
    top: 90px;
}

.listing__company__card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
}

.listing__report {
    margin-top: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
}

.listing__report__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.listing__report h3 {
    margin: 0;
    font-size: 1rem;
}

.listing__report .report-form {
    display: none;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.listing__report.is-open .report-form {
    display: grid;
}

.listing__report select,
.listing__report textarea {
    width: 100%;
}

.listing__report label {
    font-weight: 600;
    color: #1f2937;
}

.listing__report select,
.listing__report textarea {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.95rem;
}

.report-toggle {
    padding: 8px 14px;
    font-size: 0.9rem;
}

.company__logo-wrap {
    display: grid;
    place-items: center;
}

.company__logo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.company__summary {
    color: #475569;
    margin: 0;
}

.company__details {
    display: grid;
    gap: 0.75rem;
}

.company__details span {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
}

.company__details strong {
    font-size: 1rem;
    color: #0f172a;
}

.apply__button {
    width: 100%;
    border-radius: 8px;
}

.apply__button--ghost {
    background: #ffffff;
    color: #2868a7;
    border: 1px solid rgba(40, 104, 167, 0.28);
}

.apply__button--ghost:hover {
    background: #f8fbff;
    color: #2868a7;
}

.token__cost {
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
    margin: 0;
}

.form__error {
    color: #b91c1c;
    font-size: 0.9rem;
    text-align: center;
    margin: 0.5rem 0 0;
}

.form__success {
    color: #0f766e;
    font-size: 0.92rem;
    text-align: center;
    margin: 0.5rem 0 0;
}

.form__hint {
    font-size: 0.9rem;
    color: #475569;
    text-align: center;
    margin: 0.4rem 0 0;
}

.listing__application__form {
    display: none;
    max-width: 600px;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    width: min(860px, 94vw);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
}

.job__listing__application__form__title {
    text-align: center;
    margin: 0 0 0.6rem;
    font-size: 1.6rem;
}

.form__title {
    font-weight: 600;
    margin: 0 0 1.2rem;
    color: #1f2937;
}

.listing__application__form form {
    display: grid;
    gap: 1rem;
}

.form__field {
    display: grid;
    gap: 0.4rem;
}

.form__field label {
    font-weight: 600;
    color: #111827;
}

.saved__asset__toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
    color: #1f2937;
}

.saved__asset__toggle input {
    width: auto;
}

.listing__application__form input,
.listing__application__form button {
    width: 100%;
}

.listing__application__form input[type="text"],
.listing__application__form input[type="tel"],
.listing__application__form input[type="url"],
.listing__application__form textarea {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 12px;
    font-size: 0.95rem;
}

.listing__application__form textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

.listing__application__form input:focus,
.listing__application__form textarea:focus {
    outline: none;
    border-color: #2868a7;
    box-shadow: 0 0 0 3px rgba(40, 104, 167, 0.15);
}

.listing__application__form input[type="file"] {
    border: 1px solid #d1d5db;
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
}

.listing__application__form small {
    color: #64748b;
    font-size: 0.82rem;
}

.listing__application__form input[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.listing__application__form button[type="submit"] {
    border-radius: 999px;
    font-weight: 700;
    padding: 12px 18px;
}

.field__error {
    display: none;
    font-size: 0.85rem;
    color: #b91c1c;
}

.form__field.field--error input {
    border-color: #b91c1c;
    background: #fef2f2;
}

.form__field.field--error .field__error {
    display: block;
}

.listing__application__confirmation__job {
    display: none;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    max-width: 720px;
    margin: 2rem auto 0;
}

.listing__application__confirmation__job img {
    max-width: 100px;
    margin: 1rem auto;
}

.listing__application__confirmation__job button a {
    text-decoration: none;
    color: white;
}

.post-apply-referral {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #bfdbfe;
    text-align: left;
}

.post-apply-referral__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1d4ed8;
}

.post-apply-referral h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #0f172a;
}

.post-apply-referral p {
    margin: 0;
    color: #334155;
}

.post-apply-referral__copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.post-apply-referral__input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #93c5fd;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
}

.post-apply-referral__copy__button {
    width: auto;
    min-width: 132px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.post-apply-referral__copy__button:hover {
    background: #1d4ed8;
}

.post-apply-referral__footnote {
    margin-top: 0.75rem !important;
    font-size: 0.86rem;
    color: #475569 !important;
}

.multiline {
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== Modal backdrop ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 10000;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.no-scroll {
  overflow: hidden;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  z-index: 10001;
  border-radius: 14px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.token__error__modal.is-open {
  padding: 20px;
}

.modal.is-closing {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.98);
}

.modal-close {
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: none;
  color: black;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  justify-self: right;
  max-width: fit-content;
}

.modal-close:hover {
  background: transparent;
  color:black;
}

@media (max-width: 900px) {
    .listing__details {
        grid-template-columns: 1fr;
    }

    .listing__sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .listing__details {
        margin: 1.5rem auto 2rem;
        padding: 0 1rem;
    }

    .listing__hero {
        padding-top: 1rem;
        scroll-margin-top: 120px;
    }

    .listing__details {
        margin-top: 1.25rem;
    }

    .listing__hero h1 {
        font-size: 1.55rem;
        line-height: 1.35;
    }

    .listing__meta {
        display: none;
    }

    .listing__application__form {
        padding: 1.5rem;
    }

    .post-apply-referral__copy {
        grid-template-columns: 1fr;
    }

    .post-apply-referral__copy__button {
        width: 100%;
    }
}
